export default{
    //判断是否以指定字符串结尾
    endWith(str,endStr){
        var d = str.length - endStr.length;
        return (d >= 0&&str.lastIndexOf(endStr) == d)
    },
    //判断是否以指定字符串开头
    startWith(str,endStr){
        var d = endStr.length;
        return (str.substring(0,d) === endStr)
    }
}